<template>
	<view class="content">
	    <as-calendar ref='as' :markDays='markDays' :headerBar='true' @onDayClick='onDayClick' ></as-calendar>
	    <view class="change">选中日期：{{curDate}}</view>
	</view>
</template>

<script>
	 import asCalendar from '@/components/as-calendar/as-calendar.vue'
	 export default {
	  components:{
	    asCalendar
	  },
	  data() {
	   return {
	      curDate:'',
	      markDays:[]
	   }
	  },
	  onReady() {
	            let today = this.$refs.as.getToday().date;
	            this.curDate = today;
	            this.markDays.push(today);
	  },
	  methods: {
	            onDayClick(data){
	                this.curDate = data.date;
	            }
	  }
	 }
</script>

<style lang="scss">

</style>
